<template>
    <div class="inner">
      <div class="top">
        <img :src="itemData.image.url" alt="">
      </div>
      <div class="bottom">
        <div class="adress">{{ itemData.location }}</div>
        <div class="houseName">{{ itemData.houseName }}</div>
        <div class="content">
            <div class="summaryText"> {{ itemData.summaryText }}</div>
        </div>
        <div class="price">
            <div class="newPrice item">￥{{itemData.finalPrice }}</div>
            <div class="oldprice item">￥{{itemData.productPrice }}</div>
            <div class="discount item">{{itemData.priceTipBadge.text }}</div>
        </div>
      </div>
    </div>
     
</template>

<script setup>

const props = defineProps({
    itemData: {
        type: Object,
        default:{}
    }
})

</script>

<style lang="less" scoped>
 .inner
 {
     width:50%;
    height: 220px;
    padding: 10px;
    box-sizing: border-box;

    .top
    {
        img
        {
          width: 150px;
          height: 100px;
        }
    }

    .bottom
    {
        width: 150px;
        height:75px;
        margin: 5px;
        color: #444;
        font-size: 14px;
        .houseName
        {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            margin-top: 5px;
        }

        .summaryText
        {
            font-size: 14px;
            margin-top: 5px;
        }

        .price
        {
            display: flex;
            justify-content:left;
            flex-shrink: 0;
            margin-top: 5px;
            
            .item
            {
                display: flex;
                align-items: center;
                margin-right:2px;
                font-size: 12px;
            }

            .newPrice
            {
               font-size: 14px;  
               color: #ff9854;     
            }

            .oldprice
            {
                text-decoration: line-through;
                color: #999;
                font-size: 10px;
            }

            .discount
            {
                display: flex;
                align-items: center;
                color: #fff;
                background-color: #f88;
                border-radius: 10px;
                padding: 2px;
                font-size: 12px;
            }
        }
    }
 }
</style>